import Vue from "vue"
import VueRouter from "vue-router"
import discover from "@/pages/discover"
import friend from "@/pages/friend"
// import mine from "@/pages/mine"

Vue.use(VueRouter)

let routes = [
    {
        path:"/",
        component:()=>import("@/pages/cartPages")
    },
    {
        path:"/discover",
        component:discover
    },
    {
        path:"/friend",
        component:friend
    },
    {
        path:"/mine",
        component:()=>import(/*webpackChunkName:'mine'*/"@/pages/mine")
    },
    {
        path:"/list",
        component:()=>import("@/pages/list")
    },
    {
        path:"/detail/:productid",
        component:()=>import("@/pages/detail")
    },
    // {
    //     path:"*",
    //     component:()=>import("@/pages/page404")
    // }
]

let router = new VueRouter({
    // routes:routes 
    routes
})

export default router